package com.dycong.common.IO.netty.ssl;

import javax.net.ssl.TrustManager;

/**
 * Created by dycong on 2017/4/5.
 */
public class KeyStoreAndTrustConfig {
    public static String CLIENT_KEYSTORE_FILEPATH="F:/Github/MyUtil/src/test/resources/cer/client.jks";
  public static String CLIENT_TRUST_FILEPATH="F:/Github/MyUtil/src/test/resources/cer/clientTrust.jks";

    public static String CLIENT_KEY_FILE_PW="Cdycong";
    public static String CLIENT_KEY_PW="Cdycong";

    public static String CLIENT_TRUST_FILE_PW="1234sp";

    public static String SERVER_KEYSTORE_FILEPATH="F:/Github/MyUtil/src/test/resources/cer/server.jks";
    public static String SERVER_TRUST_FILEPATH="F:/Github/MyUtil/src/test/resources/cer/serverTrust.jks";

    public static String SERVER_KEY_FILE_PW="Sdycong";
    public static String SERVER_KEY_PW="Sdycong";

    public static String SERVER_TRUST_FILE_PW="1234sp";

    public static String getClientKeystoreFilepath() {
        return CLIENT_KEYSTORE_FILEPATH;
    }

    public static void setClientKeystoreFilepath(String clientKeystoreFilepath) {
        CLIENT_KEYSTORE_FILEPATH = clientKeystoreFilepath;
    }

    public static String getClientTrustFilepath() {
        return CLIENT_TRUST_FILEPATH;
    }

    public static void setClientTrustFilepath(String clientTrustFilepath) {
        CLIENT_TRUST_FILEPATH = clientTrustFilepath;
    }

    public static String getClientKeyFilePw() {
        return CLIENT_KEY_FILE_PW;
    }

    public static void setClientKeyFilePw(String clientKeyFilePw) {
        CLIENT_KEY_FILE_PW = clientKeyFilePw;
    }

    public static String getClientKeyPw() {
        return CLIENT_KEY_PW;
    }

    public static void setClientKeyPw(String clientKeyPw) {
        CLIENT_KEY_PW = clientKeyPw;
    }

    public static String getClientTrustFilePw() {
        return CLIENT_TRUST_FILE_PW;
    }

    public static void setClientTrustFilePw(String clientTrustFilePw) {
        CLIENT_TRUST_FILE_PW = clientTrustFilePw;
    }

    public static String getServerKeystoreFilepath() {
        return SERVER_KEYSTORE_FILEPATH;
    }

    public static void setServerKeystoreFilepath(String serverKeystoreFilepath) {
        SERVER_KEYSTORE_FILEPATH = serverKeystoreFilepath;
    }

    public static String getServerTrustFilepath() {
        return SERVER_TRUST_FILEPATH;
    }

    public static void setServerTrustFilepath(String serverTrustFilepath) {
        SERVER_TRUST_FILEPATH = serverTrustFilepath;
    }

    public static String getServerKeyFilePw() {
        return SERVER_KEY_FILE_PW;
    }

    public static void setServerKeyFilePw(String serverKeyFilePw) {
        SERVER_KEY_FILE_PW = serverKeyFilePw;
    }

    public static String getServerKeyPw() {
        return SERVER_KEY_PW;
    }

    public static void setServerKeyPw(String serverKeyPw) {
        SERVER_KEY_PW = serverKeyPw;
    }

    public static String getServerTrustFilePw() {
        return SERVER_TRUST_FILE_PW;
    }

    public static void setServerTrustFilePw(String serverTrustFilePw) {
        SERVER_TRUST_FILE_PW = serverTrustFilePw;
    }

    public TrustManager[] getSelfX509TrustManager(){
        return new TrustManager[]{new SelfX509TrustManager()};
    }
}
